<template>
  <div class="error-container">
    <div class="error-code">500</div>
    <div class="error-desc">抱歉，服务器出错了</div>
    <div class="error-actions">
      <el-button type="primary" @click="goHome">返回首页</el-button>
      <el-button @click="goBack">返回上页</el-button>
      <el-button type="success" @click="reload">刷新页面</el-button>
    </div>
  </div>
</template>

<script>
import { useRouter } from 'vue-router';

export default {
  name: 'Page500',
  setup() {
    const router = useRouter();
    
    const goHome = () => {
      router.push('/');
    };
    
    const goBack = () => {
      router.go(-1);
    };
    
    const reload = () => {
      window.location.reload();
    };
    
    return {
      goHome,
      goBack,
      reload
    };
  }
};
</script>

<style lang="scss" scoped>
@use '@/styles/variables.scss' as vars;

.error-container {
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background-color: #f0f2f5;
  
  .error-code {
    font-size: 120px;
    font-weight: bold;
    color: vars.$danger-color;
    margin-bottom: 20px;
  }
  
  .error-desc {
    font-size: 24px;
    color: vars.$text-primary;
    margin-bottom: 40px;
  }
  
  .error-actions {
    display: flex;
    justify-content: center;
    
    .el-button {
      margin: 0 10px;
    }
  }
}
</style> 